FIG. 1 is a diagram illustrating an exemplary logical configuration of a packet processing apparatus. The packet processing apparatus such as a router or layer 2 switch executes QoS according to a contract bandwidth of a user. The QoS includes, for example, priority control intended to preferentially output voice or other high-priority packets and bandwidth control intended to restrict an output rate to a contract bandwidth.
The bandwidth control includes, for example, input control intended for input packets and output control intended for output packets. Examples of input control include policing. The policing is a method for controlling the output rate of the packet processing apparatus, for example, by discarding packets entering at a rate in excess of CIR (Committed Information Rate), which is a guaranteed bandwidth. The policing is done, for example, by a policer provided on an input-side interface card P11 of the packet processing apparatus illustrated in FIG. 1. Examples of output control include scheduling and shaping. The scheduling is a technique for controlling output timing of packets. Such techniques include, for example, a method that preferentially outputs packets queued on a priority basis, in descending order of priority (priority queuing). The shaping is a method for controlling the output rate by queuing the packets that exceed the CIR. The shaping and scheduling are done, for example, by a shaper and scheduler provided on an output-side interface card P12 of the packet processing apparatus illustrated in FIG. 1. Recently, processing for bandwidth control has become complicated along with increases in volumes of traffic and processing performed on interface cards has become complicated accordingly.